# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=gnome-tweaks
pkgver=42beta+r14+g2d9d76c
pkgrel=3
pkgdesc="Graphical interface for advanced GNOME 3 settings (Tweak Tool)"
url="https://wiki.gnome.org/Apps/Tweaks"
arch=(any)
license=(GPL)
depends=(gnome-settings-daemon python-gobject libhandy)
makedepends=(git meson)
provides=("gnome-tweak-tool=$pkgver")
conflicts=(gnome-tweak-tool)
replaces=(gnome-tweak-tool)
groups=(gnome-extra)
_commit=2d9d76c614ba3f6464855aeb4193b100df66d95c  # master
source=("git+https://gitlab.gnome.org/GNOME/gnome-tweaks.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/\.beta/beta/;s/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}
